package validator;

import exception.ParamCheckFailureException;

/**
 * 数值类校验器为null时的实现。创建此类的目的是为了满足不为null时才校验的情况，达到和不为null时校验API一致，此类使用空实现。
 *
 * @Author 小白龙
 * @Date 2021-01-21
 * @Version 1.0
 */
public class NumberValidatorIfNull implements INumberValidate {
    @Override
    public INumberValidate max(Long max, String errorMessage) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate max(Long max) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate min(Long min) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate min(Long min, String errorMessage) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate range(int min, int max, String errorMessage) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate range(int min, int max) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate gtZero() throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate gtOrEqZero() throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate ltZero() throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate ltOrEqZero() throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate notNull(String errorMessage) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate notNull() throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate min(int min) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate min(int min, String errorMessage) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate max(int max, String errorMessage) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate max(int max) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate length(int min, int max, String errorMessage) throws ParamCheckFailureException {
        return this;
    }

    @Override
    public INumberValidate length(int min, int max) throws ParamCheckFailureException {
        return this;
    }
}
